@use '../partials/mixin' as mx;

.CSS_START_components_inputs {
  display: none;
}

input[type="text"],
input[type="number"],
input[type="phone"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="week"],
input[type="color"],
input[type="url"],
input[type="search"] {
  display: inline-block;
  position: relative;
  width: auto;
  height: 35px;
  background-color: transparent;
  border-top: none;
  border-right: none;
  border-left: none;
  border-bottom: 1px solid var(--color-gray-400);
  border-radius: 0;
  color: var(--color-text-primary);
  font-size: 0.9rem;

  // @media (prefers-color-scheme: dark) {
  //   background-color: #2D2D2D;

  //   &::placeholder {
  //     color: white;
  //   }
  // }

  &::placeholder {
    color: var(--color-gray-400);
  }

  &.outline {
    border: 1px solid var(--color-gray-400);
  }
}

input[type="text"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="number"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="phone"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="email"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="password"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="date"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="time"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="week"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="color"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="url"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE),
input[type="search"]:not(.R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE) {
  &:focus {
    @include mx.R2_MIXIN_FOCUS_OUTLINE;
  }
}

form[role="search"] {
  background-color: var(--color-annotation-bg);
  color: var(--color-text-primary);
  width: 300px !important;
  height: 30px !important;

  &:has(input:focus) {    
    outline: var(--color-brand-primary) solid 2px !important;
    outline-offset: -2px;
  }
}

select {
  appearance: none;
}

.form_group {
  width: 150px;
  height: 25px;
  padding:2px;
  border:1px solid var(--color-gray-950);
  margin: 0;
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  background-color: transparent;

  // @media (prefers-color-scheme: dark) {
  //   background-color: #2D2D2D;
  // }

  &:has(input:focus), &:has(button:focus) {    
    outline: var(--color-brand-primary) solid 2px !important;
    outline-offset: -2px;
  }

  & >label{
      position:absolute;
      line-height: 90%;
      top: -7px;
      left: 10px;
      background-color: var(--color-neutral-base);
      padding: 0 5px;
      z-index: 1;
      font-size: 12px;
  }

  & >input{
      border:none;
      width: calc(100% - 35px);
      height: 25px;
      margin-left: 30px;
      background-color: transparent;
  }

  & i {
    width: 15px;
    padding: 5px;
    position: absolute;
  }
      
}

.form_group_allPubSearch {
  height: 28px !important;
  background-color: var(--color-neutral-base);

  label {
    top: -20px;
    left: 0;
    line-height: unset;
    font-size: 14px;
    font-weight: 600;
    padding: 0;

    > div {
      margin-left: 0 !important;
    }
  }
}

.form_group_catalog {
  width: 100%;
  height: 30px;
  margin-top: 30px;

  &:has(input:focus) {    
    outline: var(--color-brand-primary) solid 2px !important;
    outline-offset: -2px;
  }

  svg {
    height: 14px;
    position: absolute;
    left: 20px;
    transform: translate(-50%, -50%);
    top: 50%;
  }
}

.form_group_wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: 10px;

  & button {
    min-width: 100px;
    height: 35px;
  }
}

/* 6. dropzone */

.dropzone {
  position: fixed;
  overflow: hidden;
  inset: 0;
}

.passphrase_infos {
  display: flex;
  align-items: start;
  justify-content: flex-start;
  gap: 10px;
  width: fit-content;
  font-size: 14px;
  background-color: var(--color-gray-50);
  color: var(--color-text-primary);
  padding: 5px 10px;
  border-radius: 5px;
  margin: 10px 0;

  svg {
    width: 16px;
    height: 16px;
    color: var(--color-brand-primary);
  }
}

.passphrase_error {
  color: var(--color-error-text);
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;

  svg {
    fill: var(--color-error-text);
    height: 12px;
  }
}

.CSS_END_components_inputs {
  display: none;
}
